﻿<UserControl x:Class="AuroraPlatform.View.Level2.LableItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:AuroraPlatform"
    mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <local:LightingTypeConverter x:Key="LightingTypeConverter"/>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.Resources>
            <!-- DataTemplate for Photograph instances -->
            <DataTemplate x:Key="PhotographTemplate">
                <Grid Margin="6">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="20" />
                    </Grid.RowDefinitions>
                    <Viewbox Height="150" Width="150" VerticalAlignment="Bottom">
                        <Image Source="{Binding PicFacade}"/>
                    </Viewbox>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom">
                        <TextBlock Text="{Binding ProdSeries}" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="13"/>
                        <TextBlock Text="{Binding AdpClass, Converter={StaticResource LightingTypeConverter}}" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="13" Margin="5, 0, 0, 0"/>
                    </StackPanel>
                </Grid>
            </DataTemplate>
        </Grid.Resources>
        <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" x:Name="Title" Text="iGuzzini" Foreground="Gray" FontSize="14"/>
        <ListBox x:Name="Pictures" Width="980" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0, 5, 0, 0"
                  Style="{StaticResource WrapListBox}"
                  ItemTemplate="{StaticResource PhotographTemplate}" />

    </Grid>
</UserControl>
